/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'regional';
  @endpointMap = {
    'cn-qingdao' = 'ess.aliyuncs.com',
    'cn-beijing' = 'ess.aliyuncs.com',
    'cn-hangzhou' = 'ess.aliyuncs.com',
    'cn-shanghai' = 'ess.aliyuncs.com',
    'cn-shenzhen' = 'ess.aliyuncs.com',
    'cn-hongkong' = 'ess.aliyuncs.com',
    'ap-southeast-1' = 'ess.aliyuncs.com',
    'us-east-1' = 'ess.aliyuncs.com',
    'us-west-1' = 'ess.aliyuncs.com',
    'cn-shanghai-finance-1' = 'ess.aliyuncs.com',
    'cn-shenzhen-finance-1' = 'ess.aliyuncs.com',
    'cn-north-2-gov-1' = 'ess.aliyuncs.com',
    'ap-northeast-2-pop' = 'ess.aliyuncs.com',
    'cn-beijing-finance-pop' = 'ess.aliyuncs.com',
    'cn-beijing-gov-1' = 'ess.aliyuncs.com',
    'cn-beijing-nu16-b01' = 'ess.aliyuncs.com',
    'cn-edge-1' = 'ess.aliyuncs.com',
    'cn-fujian' = 'ess.aliyuncs.com',
    'cn-haidian-cm12-c01' = 'ess.aliyuncs.com',
    'cn-hangzhou-bj-b01' = 'ess.aliyuncs.com',
    'cn-hangzhou-finance' = 'ess.aliyuncs.com',
    'cn-hangzhou-internal-prod-1' = 'ess.aliyuncs.com',
    'cn-hangzhou-internal-test-1' = 'ess.aliyuncs.com',
    'cn-hangzhou-internal-test-2' = 'ess.aliyuncs.com',
    'cn-hangzhou-internal-test-3' = 'ess.aliyuncs.com',
    'cn-hangzhou-test-306' = 'ess.aliyuncs.com',
    'cn-hongkong-finance-pop' = 'ess.aliyuncs.com',
    'cn-huhehaote-nebula-1' = 'ess.aliyuncs.com',
    'cn-qingdao-nebula' = 'ess.aliyuncs.com',
    'cn-shanghai-et15-b01' = 'ess.aliyuncs.com',
    'cn-shanghai-et2-b01' = 'ess.aliyuncs.com',
    'cn-shanghai-inner' = 'ess.aliyuncs.com',
    'cn-shanghai-internal-test-1' = 'ess.aliyuncs.com',
    'cn-shenzhen-inner' = 'ess.aliyuncs.com',
    'cn-shenzhen-st4-d01' = 'ess.aliyuncs.com',
    'cn-shenzhen-su18-b01' = 'ess.aliyuncs.com',
    'cn-wuhan' = 'ess.aliyuncs.com',
    'cn-yushanfang' = 'ess.aliyuncs.com',
    'cn-zhangbei' = 'ess.aliyuncs.com',
    'cn-zhangbei-na61-b01' = 'ess.aliyuncs.com',
    'cn-zhangjiakou-na62-a01' = 'ess.aliyuncs.com',
    'cn-zhengzhou-nebula-1' = 'ess.aliyuncs.com',
    'eu-west-1-oxs' = 'ess.aliyuncs.com',
    'rus-west-1-pop' = 'ess.aliyuncs.com',
  };

  checkConfig(config);
  @endpoint = getEndpoint('ess', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AttachInstancesRequest {
  instanceId?: [ string ](name='InstanceId'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingGroupId?: string(name='ScalingGroupId', description='This parameter is required.'),
}

model AttachInstancesResponseBody = {
  requestId?: string(name='RequestId'),
  scalingActivityId?: string(name='ScalingActivityId'),
}

model AttachInstancesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AttachInstancesResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI AttachInstances is deprecated, please use Ess::2014-08-28::AttachInstances,Ess::2022-02-22::AttachInstances instead.
 *
 * @param request AttachInstancesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AttachInstancesResponse
 */
// Deprecated
async function attachInstancesWithOptions(request: AttachInstancesRequest, runtime: Util.RuntimeOptions): AttachInstancesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scalingGroupId)) {
    query['ScalingGroupId'] = request.scalingGroupId;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AttachInstances',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI AttachInstances is deprecated, please use Ess::2014-08-28::AttachInstances,Ess::2022-02-22::AttachInstances instead.
 *
 * @param request AttachInstancesRequest
 * @return AttachInstancesResponse
 */
// Deprecated
async function attachInstances(request: AttachInstancesRequest): AttachInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  return attachInstancesWithOptions(request, runtime);
}

model CreateScalingConfigurationRequest {
  dataDisk?: [
    {
      category?: string(name='Category'),
      deleteWithInstance?: string(name='DeleteWithInstance'),
      device?: string(name='Device'),
      size?: int32(name='Size'),
      snapshotId?: string(name='SnapshotId'),
    }
  ](name='DataDisk'),
  systemDisk?: {
    category?: string(name='Category'),
    size?: int32(name='Size'),
  }(name='SystemDisk'),
  imageId?: string(name='ImageId', description='This parameter is required.'),
  instanceType?: string(name='InstanceType', description='This parameter is required.'),
  internetChargeType?: string(name='InternetChargeType'),
  internetMaxBandwidthIn?: int32(name='InternetMaxBandwidthIn'),
  internetMaxBandwidthOut?: int32(name='InternetMaxBandwidthOut'),
  ioOptimized?: string(name='IoOptimized'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingConfigurationName?: string(name='ScalingConfigurationName'),
  scalingGroupId?: string(name='ScalingGroupId', description='This parameter is required.'),
  securityGroupId?: string(name='SecurityGroupId', description='This parameter is required.'),
}

model CreateScalingConfigurationResponseBody = {
  requestId?: string(name='RequestId'),
  scalingConfigurationId?: string(name='ScalingConfigurationId'),
}

model CreateScalingConfigurationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateScalingConfigurationResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI CreateScalingConfiguration is deprecated, please use Ess::2022-02-22::CreateScalingConfiguration,Ess::2014-08-28::CreateScalingConfiguration instead.
 *
 * @param request CreateScalingConfigurationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateScalingConfigurationResponse
 */
// Deprecated
async function createScalingConfigurationWithOptions(request: CreateScalingConfigurationRequest, runtime: Util.RuntimeOptions): CreateScalingConfigurationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.imageId)) {
    query['ImageId'] = request.imageId;
  }
  if (!Util.isUnset(request.instanceType)) {
    query['InstanceType'] = request.instanceType;
  }
  if (!Util.isUnset(request.internetChargeType)) {
    query['InternetChargeType'] = request.internetChargeType;
  }
  if (!Util.isUnset(request.internetMaxBandwidthIn)) {
    query['InternetMaxBandwidthIn'] = request.internetMaxBandwidthIn;
  }
  if (!Util.isUnset(request.internetMaxBandwidthOut)) {
    query['InternetMaxBandwidthOut'] = request.internetMaxBandwidthOut;
  }
  if (!Util.isUnset(request.ioOptimized)) {
    query['IoOptimized'] = request.ioOptimized;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scalingConfigurationName)) {
    query['ScalingConfigurationName'] = request.scalingConfigurationName;
  }
  if (!Util.isUnset(request.scalingGroupId)) {
    query['ScalingGroupId'] = request.scalingGroupId;
  }
  if (!Util.isUnset(request.securityGroupId)) {
    query['SecurityGroupId'] = request.securityGroupId;
  }
  if (!Util.isUnset(request.dataDisk)) {
    query['DataDisk'] = request.dataDisk;
  }
  if (!Util.isUnset(request.systemDisk)) {
    query['SystemDisk'] = request.systemDisk;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateScalingConfiguration',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI CreateScalingConfiguration is deprecated, please use Ess::2022-02-22::CreateScalingConfiguration,Ess::2014-08-28::CreateScalingConfiguration instead.
 *
 * @param request CreateScalingConfigurationRequest
 * @return CreateScalingConfigurationResponse
 */
// Deprecated
async function createScalingConfiguration(request: CreateScalingConfigurationRequest): CreateScalingConfigurationResponse {
  var runtime = new Util.RuntimeOptions{};
  return createScalingConfigurationWithOptions(request, runtime);
}

model CreateScalingGroupRequest {
  removalPolicy?: [ string ](name='RemovalPolicy'),
  DBInstanceIds?: string(name='DBInstanceIds'),
  defaultCooldown?: int32(name='DefaultCooldown'),
  loadBalancerIds?: string(name='LoadBalancerIds'),
  maxSize?: int32(name='MaxSize', description='This parameter is required.'),
  minSize?: int32(name='MinSize', description='This parameter is required.'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  scalingGroupName?: string(name='ScalingGroupName'),
  vSwitchId?: string(name='VSwitchId'),
}

model CreateScalingGroupResponseBody = {
  requestId?: string(name='RequestId'),
  scalingGroupId?: string(name='ScalingGroupId'),
}

model CreateScalingGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateScalingGroupResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI CreateScalingGroup is deprecated, please use Ess::2022-02-22::CreateScalingGroup,Ess::2014-08-28::CreateScalingGroup instead.
 *
 * @param request CreateScalingGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateScalingGroupResponse
 */
// Deprecated
async function createScalingGroupWithOptions(request: CreateScalingGroupRequest, runtime: Util.RuntimeOptions): CreateScalingGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBInstanceIds)) {
    query['DBInstanceIds'] = request.DBInstanceIds;
  }
  if (!Util.isUnset(request.defaultCooldown)) {
    query['DefaultCooldown'] = request.defaultCooldown;
  }
  if (!Util.isUnset(request.loadBalancerIds)) {
    query['LoadBalancerIds'] = request.loadBalancerIds;
  }
  if (!Util.isUnset(request.maxSize)) {
    query['MaxSize'] = request.maxSize;
  }
  if (!Util.isUnset(request.minSize)) {
    query['MinSize'] = request.minSize;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.scalingGroupName)) {
    query['ScalingGroupName'] = request.scalingGroupName;
  }
  if (!Util.isUnset(request.vSwitchId)) {
    query['VSwitchId'] = request.vSwitchId;
  }
  if (!Util.isUnset(request.removalPolicy)) {
    query['RemovalPolicy'] = request.removalPolicy;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateScalingGroup',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI CreateScalingGroup is deprecated, please use Ess::2022-02-22::CreateScalingGroup,Ess::2014-08-28::CreateScalingGroup instead.
 *
 * @param request CreateScalingGroupRequest
 * @return CreateScalingGroupResponse
 */
// Deprecated
async function createScalingGroup(request: CreateScalingGroupRequest): CreateScalingGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return createScalingGroupWithOptions(request, runtime);
}

model CreateScalingRuleRequest {
  adjustmentType?: string(name='AdjustmentType', description='This parameter is required.'),
  adjustmentValue?: int32(name='AdjustmentValue', description='This parameter is required.'),
  cooldown?: int32(name='Cooldown'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingGroupId?: string(name='ScalingGroupId', description='This parameter is required.'),
  scalingRuleName?: string(name='ScalingRuleName'),
}

model CreateScalingRuleResponseBody = {
  requestId?: string(name='RequestId'),
  scalingRuleAri?: string(name='ScalingRuleAri'),
  scalingRuleId?: string(name='ScalingRuleId'),
}

model CreateScalingRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateScalingRuleResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI CreateScalingRule is deprecated, please use Ess::2022-02-22::CreateScalingRule,Ess::2014-08-28::CreateScalingRule instead.
 *
 * @param request CreateScalingRuleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateScalingRuleResponse
 */
// Deprecated
async function createScalingRuleWithOptions(request: CreateScalingRuleRequest, runtime: Util.RuntimeOptions): CreateScalingRuleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.adjustmentType)) {
    query['AdjustmentType'] = request.adjustmentType;
  }
  if (!Util.isUnset(request.adjustmentValue)) {
    query['AdjustmentValue'] = request.adjustmentValue;
  }
  if (!Util.isUnset(request.cooldown)) {
    query['Cooldown'] = request.cooldown;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scalingGroupId)) {
    query['ScalingGroupId'] = request.scalingGroupId;
  }
  if (!Util.isUnset(request.scalingRuleName)) {
    query['ScalingRuleName'] = request.scalingRuleName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateScalingRule',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI CreateScalingRule is deprecated, please use Ess::2022-02-22::CreateScalingRule,Ess::2014-08-28::CreateScalingRule instead.
 *
 * @param request CreateScalingRuleRequest
 * @return CreateScalingRuleResponse
 */
// Deprecated
async function createScalingRule(request: CreateScalingRuleRequest): CreateScalingRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return createScalingRuleWithOptions(request, runtime);
}

model CreateScheduledTaskRequest {
  description?: string(name='Description'),
  launchExpirationTime?: int32(name='LaunchExpirationTime'),
  launchTime?: string(name='LaunchTime'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  recurrenceEndTime?: string(name='RecurrenceEndTime'),
  recurrenceType?: string(name='RecurrenceType'),
  recurrenceValue?: string(name='RecurrenceValue'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scheduledAction?: string(name='ScheduledAction', description='This parameter is required.'),
  scheduledTaskName?: string(name='ScheduledTaskName'),
  taskEnabled?: boolean(name='TaskEnabled'),
}

model CreateScheduledTaskResponseBody = {
  requestId?: string(name='RequestId'),
  scheduledTaskId?: string(name='ScheduledTaskId'),
}

model CreateScheduledTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateScheduledTaskResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI CreateScheduledTask is deprecated, please use Ess::2022-02-22::CreateScheduledTask,Ess::2014-08-28::CreateScheduledTask instead.
 *
 * @param request CreateScheduledTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateScheduledTaskResponse
 */
// Deprecated
async function createScheduledTaskWithOptions(request: CreateScheduledTaskRequest, runtime: Util.RuntimeOptions): CreateScheduledTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.launchExpirationTime)) {
    query['LaunchExpirationTime'] = request.launchExpirationTime;
  }
  if (!Util.isUnset(request.launchTime)) {
    query['LaunchTime'] = request.launchTime;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.recurrenceEndTime)) {
    query['RecurrenceEndTime'] = request.recurrenceEndTime;
  }
  if (!Util.isUnset(request.recurrenceType)) {
    query['RecurrenceType'] = request.recurrenceType;
  }
  if (!Util.isUnset(request.recurrenceValue)) {
    query['RecurrenceValue'] = request.recurrenceValue;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scheduledAction)) {
    query['ScheduledAction'] = request.scheduledAction;
  }
  if (!Util.isUnset(request.scheduledTaskName)) {
    query['ScheduledTaskName'] = request.scheduledTaskName;
  }
  if (!Util.isUnset(request.taskEnabled)) {
    query['TaskEnabled'] = request.taskEnabled;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateScheduledTask',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI CreateScheduledTask is deprecated, please use Ess::2022-02-22::CreateScheduledTask,Ess::2014-08-28::CreateScheduledTask instead.
 *
 * @param request CreateScheduledTaskRequest
 * @return CreateScheduledTaskResponse
 */
// Deprecated
async function createScheduledTask(request: CreateScheduledTaskRequest): CreateScheduledTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return createScheduledTaskWithOptions(request, runtime);
}

model DeleteScalingConfigurationRequest {
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingConfigurationId?: string(name='ScalingConfigurationId', description='This parameter is required.'),
}

model DeleteScalingConfigurationResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteScalingConfigurationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteScalingConfigurationResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI DeleteScalingConfiguration is deprecated, please use Ess::2022-02-22::DeleteScalingConfiguration,Ess::2014-08-28::DeleteScalingConfiguration instead.
 *
 * @param request DeleteScalingConfigurationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteScalingConfigurationResponse
 */
// Deprecated
async function deleteScalingConfigurationWithOptions(request: DeleteScalingConfigurationRequest, runtime: Util.RuntimeOptions): DeleteScalingConfigurationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scalingConfigurationId)) {
    query['ScalingConfigurationId'] = request.scalingConfigurationId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteScalingConfiguration',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI DeleteScalingConfiguration is deprecated, please use Ess::2022-02-22::DeleteScalingConfiguration,Ess::2014-08-28::DeleteScalingConfiguration instead.
 *
 * @param request DeleteScalingConfigurationRequest
 * @return DeleteScalingConfigurationResponse
 */
// Deprecated
async function deleteScalingConfiguration(request: DeleteScalingConfigurationRequest): DeleteScalingConfigurationResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteScalingConfigurationWithOptions(request, runtime);
}

model DeleteScalingGroupRequest {
  forceDelete?: boolean(name='ForceDelete'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  scalingGroupId?: string(name='ScalingGroupId', description='This parameter is required.'),
}

model DeleteScalingGroupResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteScalingGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteScalingGroupResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI DeleteScalingGroup is deprecated, please use Ess::2022-02-22::DeleteScalingGroup,Ess::2014-08-28::DeleteScalingGroup instead.
 *
 * @param request DeleteScalingGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteScalingGroupResponse
 */
// Deprecated
async function deleteScalingGroupWithOptions(request: DeleteScalingGroupRequest, runtime: Util.RuntimeOptions): DeleteScalingGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.forceDelete)) {
    query['ForceDelete'] = request.forceDelete;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.scalingGroupId)) {
    query['ScalingGroupId'] = request.scalingGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteScalingGroup',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI DeleteScalingGroup is deprecated, please use Ess::2022-02-22::DeleteScalingGroup,Ess::2014-08-28::DeleteScalingGroup instead.
 *
 * @param request DeleteScalingGroupRequest
 * @return DeleteScalingGroupResponse
 */
// Deprecated
async function deleteScalingGroup(request: DeleteScalingGroupRequest): DeleteScalingGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteScalingGroupWithOptions(request, runtime);
}

model DeleteScalingRuleRequest {
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingRuleId?: string(name='ScalingRuleId', description='This parameter is required.'),
}

model DeleteScalingRuleResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteScalingRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteScalingRuleResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI DeleteScalingRule is deprecated, please use Ess::2022-02-22::DeleteScalingRule,Ess::2014-08-28::DeleteScalingRule instead.
 *
 * @param request DeleteScalingRuleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteScalingRuleResponse
 */
// Deprecated
async function deleteScalingRuleWithOptions(request: DeleteScalingRuleRequest, runtime: Util.RuntimeOptions): DeleteScalingRuleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scalingRuleId)) {
    query['ScalingRuleId'] = request.scalingRuleId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteScalingRule',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI DeleteScalingRule is deprecated, please use Ess::2022-02-22::DeleteScalingRule,Ess::2014-08-28::DeleteScalingRule instead.
 *
 * @param request DeleteScalingRuleRequest
 * @return DeleteScalingRuleResponse
 */
// Deprecated
async function deleteScalingRule(request: DeleteScalingRuleRequest): DeleteScalingRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteScalingRuleWithOptions(request, runtime);
}

model DeleteScheduledTaskRequest {
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scheduledTaskId?: string(name='ScheduledTaskId', description='This parameter is required.'),
}

model DeleteScheduledTaskResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteScheduledTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteScheduledTaskResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI DeleteScheduledTask is deprecated, please use Ess::2022-02-22::DeleteScheduledTask,Ess::2014-08-28::DeleteScheduledTask instead.
 *
 * @param request DeleteScheduledTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteScheduledTaskResponse
 */
// Deprecated
async function deleteScheduledTaskWithOptions(request: DeleteScheduledTaskRequest, runtime: Util.RuntimeOptions): DeleteScheduledTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scheduledTaskId)) {
    query['ScheduledTaskId'] = request.scheduledTaskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteScheduledTask',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI DeleteScheduledTask is deprecated, please use Ess::2022-02-22::DeleteScheduledTask,Ess::2014-08-28::DeleteScheduledTask instead.
 *
 * @param request DeleteScheduledTaskRequest
 * @return DeleteScheduledTaskResponse
 */
// Deprecated
async function deleteScheduledTask(request: DeleteScheduledTaskRequest): DeleteScheduledTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteScheduledTaskWithOptions(request, runtime);
}

model DescribeAccountAttributesRequest {
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeAccountAttributesResponseBody = {
  maxNumberOfDBInstances?: int32(name='MaxNumberOfDBInstances'),
  maxNumberOfLoadBalancers?: int32(name='MaxNumberOfLoadBalancers'),
  maxNumberOfMaxSize?: int32(name='MaxNumberOfMaxSize'),
  maxNumberOfMinSize?: int32(name='MaxNumberOfMinSize'),
  maxNumberOfScalingConfigurations?: int32(name='MaxNumberOfScalingConfigurations'),
  maxNumberOfScalingGroups?: int32(name='MaxNumberOfScalingGroups'),
  maxNumberOfScalingInstances?: int32(name='MaxNumberOfScalingInstances'),
  maxNumberOfScalingRules?: int32(name='MaxNumberOfScalingRules'),
  maxNumberOfScheduledTasks?: int32(name='MaxNumberOfScheduledTasks'),
}

model DescribeAccountAttributesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAccountAttributesResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI DescribeAccountAttributes is deprecated, please use Ess::2022-02-22::DescribeLimitation,Ess::2014-08-28::DescribeLimitation instead.
 *
 * @param request DescribeAccountAttributesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAccountAttributesResponse
 */
// Deprecated
async function describeAccountAttributesWithOptions(request: DescribeAccountAttributesRequest, runtime: Util.RuntimeOptions): DescribeAccountAttributesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAccountAttributes',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI DescribeAccountAttributes is deprecated, please use Ess::2022-02-22::DescribeLimitation,Ess::2014-08-28::DescribeLimitation instead.
 *
 * @param request DescribeAccountAttributesRequest
 * @return DescribeAccountAttributesResponse
 */
// Deprecated
async function describeAccountAttributes(request: DescribeAccountAttributesRequest): DescribeAccountAttributesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAccountAttributesWithOptions(request, runtime);
}

model DescribeCapacityHistoryRequest {
  endTime?: string(name='EndTime', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingGroupId?: string(name='ScalingGroupId', description='This parameter is required.'),
  startTime?: string(name='StartTime', description='This parameter is required.'),
}

model DescribeCapacityHistoryResponseBody = {
  capacityHistoryItems?: {
    capacityHistoryModel?: [ 
    {
      attachedCapacity?: int32(name='AttachedCapacity'),
      autoCreatedCapacity?: int32(name='AutoCreatedCapacity'),
      scalingGroupId?: string(name='ScalingGroupId'),
      timestamp?: string(name='Timestamp'),
      totalCapacity?: int32(name='TotalCapacity'),
    }
  ](name='CapacityHistoryModel')
  }(name='CapacityHistoryItems'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  totalCount?: int32(name='TotalCount'),
}

model DescribeCapacityHistoryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeCapacityHistoryResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI DescribeCapacityHistory is deprecated, please use Ess::2022-02-22::DescribeScalingActivities,Ess::2014-08-28::DescribeScalingActivities instead.
 *
 * @param request DescribeCapacityHistoryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeCapacityHistoryResponse
 */
// Deprecated
async function describeCapacityHistoryWithOptions(request: DescribeCapacityHistoryRequest, runtime: Util.RuntimeOptions): DescribeCapacityHistoryResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scalingGroupId)) {
    query['ScalingGroupId'] = request.scalingGroupId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeCapacityHistory',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI DescribeCapacityHistory is deprecated, please use Ess::2022-02-22::DescribeScalingActivities,Ess::2014-08-28::DescribeScalingActivities instead.
 *
 * @param request DescribeCapacityHistoryRequest
 * @return DescribeCapacityHistoryResponse
 */
// Deprecated
async function describeCapacityHistory(request: DescribeCapacityHistoryRequest): DescribeCapacityHistoryResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCapacityHistoryWithOptions(request, runtime);
}

model DescribeLimitationRequest {
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeLimitationResponseBody = {
  maxNumberOfDBInstances?: int32(name='MaxNumberOfDBInstances'),
  maxNumberOfLoadBalancers?: int32(name='MaxNumberOfLoadBalancers'),
  maxNumberOfMaxSize?: int32(name='MaxNumberOfMaxSize'),
  maxNumberOfMinSize?: int32(name='MaxNumberOfMinSize'),
  maxNumberOfScalingConfigurations?: int32(name='MaxNumberOfScalingConfigurations'),
  maxNumberOfScalingGroups?: int32(name='MaxNumberOfScalingGroups'),
  maxNumberOfScalingInstances?: int32(name='MaxNumberOfScalingInstances'),
  maxNumberOfScalingRules?: int32(name='MaxNumberOfScalingRules'),
  maxNumberOfScheduledTasks?: int32(name='MaxNumberOfScheduledTasks'),
}

model DescribeLimitationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeLimitationResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI DescribeLimitation is deprecated, please use Ess::2022-02-22::DescribeLimitation,Ess::2014-08-28::DescribeLimitation instead.
 *
 * @param request DescribeLimitationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeLimitationResponse
 */
// Deprecated
async function describeLimitationWithOptions(request: DescribeLimitationRequest, runtime: Util.RuntimeOptions): DescribeLimitationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLimitation',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI DescribeLimitation is deprecated, please use Ess::2022-02-22::DescribeLimitation,Ess::2014-08-28::DescribeLimitation instead.
 *
 * @param request DescribeLimitationRequest
 * @return DescribeLimitationResponse
 */
// Deprecated
async function describeLimitation(request: DescribeLimitationRequest): DescribeLimitationResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLimitationWithOptions(request, runtime);
}

model DescribeRegionsRequest {
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeRegionsResponseBody = {
  regions?: {
    region?: [ 
    {
      regionId?: string(name='RegionId'),
    }
  ](name='Region')
  }(name='Regions'),
}

model DescribeRegionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRegionsResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI DescribeRegions is deprecated, please use Ess::2022-02-22::DescribeRegions,Ess::2014-08-28::DescribeRegions instead.
 *
 * @param request DescribeRegionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRegionsResponse
 */
// Deprecated
async function describeRegionsWithOptions(request: DescribeRegionsRequest, runtime: Util.RuntimeOptions): DescribeRegionsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRegions',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI DescribeRegions is deprecated, please use Ess::2022-02-22::DescribeRegions,Ess::2014-08-28::DescribeRegions instead.
 *
 * @param request DescribeRegionsRequest
 * @return DescribeRegionsResponse
 */
// Deprecated
async function describeRegions(request: DescribeRegionsRequest): DescribeRegionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRegionsWithOptions(request, runtime);
}

model DescribeScalingActivitiesRequest {
  scalingActivityId?: [ string ](name='ScalingActivityId'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingGroupId?: string(name='ScalingGroupId'),
  statusCode?: string(name='StatusCode'),
}

model DescribeScalingActivitiesResponseBody = {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  scalingActivities?: {
    scalingActivity?: [ 
    {
      attachedCapacity?: string(name='AttachedCapacity'),
      autoCreatedCapacity?: string(name='AutoCreatedCapacity'),
      cause?: string(name='Cause'),
      description?: string(name='Description'),
      endTime?: string(name='EndTime'),
      progress?: int32(name='Progress'),
      scalingActivityId?: string(name='ScalingActivityId'),
      scalingGroupId?: string(name='ScalingGroupId'),
      startTime?: string(name='StartTime'),
      statusCode?: string(name='StatusCode'),
      statusMessage?: string(name='StatusMessage'),
      totalCapacity?: string(name='TotalCapacity'),
    }
  ](name='ScalingActivity')
  }(name='ScalingActivities'),
  totalCount?: int32(name='TotalCount'),
}

model DescribeScalingActivitiesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeScalingActivitiesResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI DescribeScalingActivities is deprecated, please use Ess::2022-02-22::DescribeScalingActivities,Ess::2014-08-28::DescribeScalingActivities instead.
 *
 * @param request DescribeScalingActivitiesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeScalingActivitiesResponse
 */
// Deprecated
async function describeScalingActivitiesWithOptions(request: DescribeScalingActivitiesRequest, runtime: Util.RuntimeOptions): DescribeScalingActivitiesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scalingGroupId)) {
    query['ScalingGroupId'] = request.scalingGroupId;
  }
  if (!Util.isUnset(request.statusCode)) {
    query['StatusCode'] = request.statusCode;
  }
  if (!Util.isUnset(request.scalingActivityId)) {
    query['ScalingActivityId'] = request.scalingActivityId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeScalingActivities',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI DescribeScalingActivities is deprecated, please use Ess::2022-02-22::DescribeScalingActivities,Ess::2014-08-28::DescribeScalingActivities instead.
 *
 * @param request DescribeScalingActivitiesRequest
 * @return DescribeScalingActivitiesResponse
 */
// Deprecated
async function describeScalingActivities(request: DescribeScalingActivitiesRequest): DescribeScalingActivitiesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeScalingActivitiesWithOptions(request, runtime);
}

model DescribeScalingActivityDetailRequest {
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingActivityId?: string(name='ScalingActivityId'),
}

model DescribeScalingActivityDetailResponseBody = {
  detail?: string(name='Detail'),
  scalingActivityId?: string(name='ScalingActivityId'),
}

model DescribeScalingActivityDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeScalingActivityDetailResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI DescribeScalingActivityDetail is deprecated, please use Ess::2022-02-22::DescribeScalingActivityDetail,Ess::2014-08-28::DescribeScalingActivityDetail instead.
 *
 * @param request DescribeScalingActivityDetailRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeScalingActivityDetailResponse
 */
// Deprecated
async function describeScalingActivityDetailWithOptions(request: DescribeScalingActivityDetailRequest, runtime: Util.RuntimeOptions): DescribeScalingActivityDetailResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scalingActivityId)) {
    query['ScalingActivityId'] = request.scalingActivityId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeScalingActivityDetail',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI DescribeScalingActivityDetail is deprecated, please use Ess::2022-02-22::DescribeScalingActivityDetail,Ess::2014-08-28::DescribeScalingActivityDetail instead.
 *
 * @param request DescribeScalingActivityDetailRequest
 * @return DescribeScalingActivityDetailResponse
 */
// Deprecated
async function describeScalingActivityDetail(request: DescribeScalingActivityDetailRequest): DescribeScalingActivityDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeScalingActivityDetailWithOptions(request, runtime);
}

model DescribeScalingConfigurationsRequest {
  scalingConfigurationId?: [ string ](name='ScalingConfigurationId'),
  scalingConfigurationName?: [ string ](name='ScalingConfigurationName'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingGroupId?: string(name='ScalingGroupId'),
}

model DescribeScalingConfigurationsResponseBody = {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  scalingConfigurations?: {
    scalingConfiguration?: [ 
    {
      creationTime?: string(name='CreationTime'),
      dataDisks?: {
        dataDisk?: [ 
        {
          category?: string(name='Category'),
          device?: string(name='Device'),
          size?: int32(name='Size'),
          snapshotId?: string(name='SnapshotId'),
        }
      ](name='DataDisk')
      }(name='DataDisks'),
      imageId?: string(name='ImageId'),
      instanceGeneration?: string(name='InstanceGeneration'),
      instanceType?: string(name='InstanceType'),
      internetChargeType?: string(name='InternetChargeType'),
      internetMaxBandwidthIn?: int32(name='InternetMaxBandwidthIn'),
      internetMaxBandwidthOut?: int32(name='InternetMaxBandwidthOut'),
      ioOptimized?: string(name='IoOptimized'),
      lifecycleState?: string(name='LifecycleState'),
      scalingConfigurationId?: string(name='ScalingConfigurationId'),
      scalingConfigurationName?: string(name='ScalingConfigurationName'),
      scalingGroupId?: string(name='ScalingGroupId'),
      securityGroupId?: string(name='SecurityGroupId'),
      systemDiskCategory?: string(name='SystemDiskCategory'),
      systemDiskSize?: int32(name='SystemDiskSize'),
    }
  ](name='ScalingConfiguration')
  }(name='ScalingConfigurations'),
  totalCount?: int32(name='TotalCount'),
}

model DescribeScalingConfigurationsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeScalingConfigurationsResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI DescribeScalingConfigurations is deprecated, please use Ess::2022-02-22::DescribeScalingConfigurations,Ess::2014-08-28::DescribeScalingConfigurations instead.
 *
 * @param request DescribeScalingConfigurationsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeScalingConfigurationsResponse
 */
// Deprecated
async function describeScalingConfigurationsWithOptions(request: DescribeScalingConfigurationsRequest, runtime: Util.RuntimeOptions): DescribeScalingConfigurationsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scalingGroupId)) {
    query['ScalingGroupId'] = request.scalingGroupId;
  }
  if (!Util.isUnset(request.scalingConfigurationId)) {
    query['ScalingConfigurationId'] = request.scalingConfigurationId;
  }
  if (!Util.isUnset(request.scalingConfigurationName)) {
    query['ScalingConfigurationName'] = request.scalingConfigurationName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeScalingConfigurations',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI DescribeScalingConfigurations is deprecated, please use Ess::2022-02-22::DescribeScalingConfigurations,Ess::2014-08-28::DescribeScalingConfigurations instead.
 *
 * @param request DescribeScalingConfigurationsRequest
 * @return DescribeScalingConfigurationsResponse
 */
// Deprecated
async function describeScalingConfigurations(request: DescribeScalingConfigurationsRequest): DescribeScalingConfigurationsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeScalingConfigurationsWithOptions(request, runtime);
}

model DescribeScalingGroupsRequest {
  scalingGroupId?: [ string ](name='ScalingGroupId'),
  scalingGroupName?: [ string ](name='ScalingGroupName'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
}

model DescribeScalingGroupsResponseBody = {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  scalingGroups?: {
    scalingGroup?: [ 
    {
      activeCapacity?: int32(name='ActiveCapacity'),
      activeScalingConfigurationId?: string(name='ActiveScalingConfigurationId'),
      creationTime?: string(name='CreationTime'),
      DBInstanceIds?: {
        DBInstanceId?: [ string ](name='DBInstanceId')
      }(name='DBInstanceIds'),
      defaultCooldown?: int32(name='DefaultCooldown'),
      lifecycleState?: string(name='LifecycleState'),
      loadBalancerIds?: {
        loadBalancerId?: [ string ](name='LoadBalancerId')
      }(name='LoadBalancerIds'),
      maxSize?: int32(name='MaxSize'),
      minSize?: int32(name='MinSize'),
      pendingCapacity?: int32(name='PendingCapacity'),
      regionId?: string(name='RegionId'),
      removalPolicies?: {
        removalPolicy?: [ string ](name='RemovalPolicy')
      }(name='RemovalPolicies'),
      removingCapacity?: int32(name='RemovingCapacity'),
      scalingGroupId?: string(name='ScalingGroupId'),
      scalingGroupName?: string(name='ScalingGroupName'),
      totalCapacity?: int32(name='TotalCapacity'),
      vSwitchId?: string(name='VSwitchId'),
    }
  ](name='ScalingGroup')
  }(name='ScalingGroups'),
  totalCount?: int32(name='TotalCount'),
}

model DescribeScalingGroupsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeScalingGroupsResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI DescribeScalingGroups is deprecated, please use Ess::2022-02-22::DescribeScalingGroups,Ess::2014-08-28::DescribeScalingGroups instead.
 *
 * @param request DescribeScalingGroupsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeScalingGroupsResponse
 */
// Deprecated
async function describeScalingGroupsWithOptions(request: DescribeScalingGroupsRequest, runtime: Util.RuntimeOptions): DescribeScalingGroupsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.scalingGroupId)) {
    query['ScalingGroupId'] = request.scalingGroupId;
  }
  if (!Util.isUnset(request.scalingGroupName)) {
    query['ScalingGroupName'] = request.scalingGroupName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeScalingGroups',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI DescribeScalingGroups is deprecated, please use Ess::2022-02-22::DescribeScalingGroups,Ess::2014-08-28::DescribeScalingGroups instead.
 *
 * @param request DescribeScalingGroupsRequest
 * @return DescribeScalingGroupsResponse
 */
// Deprecated
async function describeScalingGroups(request: DescribeScalingGroupsRequest): DescribeScalingGroupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeScalingGroupsWithOptions(request, runtime);
}

model DescribeScalingInstancesRequest {
  instanceId?: [ string ](name='InstanceId'),
  creationType?: string(name='CreationType'),
  healthStatus?: string(name='HealthStatus'),
  lifecycleState?: string(name='LifecycleState'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingConfigurationId?: string(name='ScalingConfigurationId'),
  scalingGroupId?: string(name='ScalingGroupId'),
}

model DescribeScalingInstancesResponseBody = {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  scalingInstances?: {
    scalingInstance?: [ 
    {
      creationTime?: string(name='CreationTime'),
      creationType?: string(name='CreationType'),
      healthStatus?: string(name='HealthStatus'),
      instanceId?: string(name='InstanceId'),
      lifecycleState?: string(name='LifecycleState'),
      scalingConfigurationId?: string(name='ScalingConfigurationId'),
      scalingGroupId?: string(name='ScalingGroupId'),
    }
  ](name='ScalingInstance')
  }(name='ScalingInstances'),
  totalCount?: int32(name='TotalCount'),
}

model DescribeScalingInstancesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeScalingInstancesResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI DescribeScalingInstances is deprecated, please use Ess::2022-02-22::DescribeScalingInstances,Ess::2014-08-28::DescribeScalingInstances instead.
 *
 * @param request DescribeScalingInstancesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeScalingInstancesResponse
 */
// Deprecated
async function describeScalingInstancesWithOptions(request: DescribeScalingInstancesRequest, runtime: Util.RuntimeOptions): DescribeScalingInstancesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.creationType)) {
    query['CreationType'] = request.creationType;
  }
  if (!Util.isUnset(request.healthStatus)) {
    query['HealthStatus'] = request.healthStatus;
  }
  if (!Util.isUnset(request.lifecycleState)) {
    query['LifecycleState'] = request.lifecycleState;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scalingConfigurationId)) {
    query['ScalingConfigurationId'] = request.scalingConfigurationId;
  }
  if (!Util.isUnset(request.scalingGroupId)) {
    query['ScalingGroupId'] = request.scalingGroupId;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeScalingInstances',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI DescribeScalingInstances is deprecated, please use Ess::2022-02-22::DescribeScalingInstances,Ess::2014-08-28::DescribeScalingInstances instead.
 *
 * @param request DescribeScalingInstancesRequest
 * @return DescribeScalingInstancesResponse
 */
// Deprecated
async function describeScalingInstances(request: DescribeScalingInstancesRequest): DescribeScalingInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeScalingInstancesWithOptions(request, runtime);
}

model DescribeScalingRulesRequest {
  scalingRuleAri?: [ string ](name='ScalingRuleAri'),
  scalingRuleId?: [ string ](name='ScalingRuleId'),
  scalingRuleName?: [ string ](name='ScalingRuleName'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingGroupId?: string(name='ScalingGroupId'),
}

model DescribeScalingRulesResponseBody = {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  scalingRules?: {
    scalingRule?: [ 
    {
      adjustmentType?: string(name='AdjustmentType'),
      adjustmentValue?: int32(name='AdjustmentValue'),
      cooldown?: int32(name='Cooldown'),
      maxSize?: int32(name='MaxSize'),
      minSize?: int32(name='MinSize'),
      scalingGroupId?: string(name='ScalingGroupId'),
      scalingRuleAri?: string(name='ScalingRuleAri'),
      scalingRuleId?: string(name='ScalingRuleId'),
      scalingRuleName?: string(name='ScalingRuleName'),
    }
  ](name='ScalingRule')
  }(name='ScalingRules'),
  totalCount?: int32(name='TotalCount'),
}

model DescribeScalingRulesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeScalingRulesResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI DescribeScalingRules is deprecated, please use Ess::2022-02-22::DescribeScalingRules,Ess::2014-08-28::DescribeScalingRules instead.
 *
 * @param request DescribeScalingRulesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeScalingRulesResponse
 */
// Deprecated
async function describeScalingRulesWithOptions(request: DescribeScalingRulesRequest, runtime: Util.RuntimeOptions): DescribeScalingRulesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scalingGroupId)) {
    query['ScalingGroupId'] = request.scalingGroupId;
  }
  if (!Util.isUnset(request.scalingRuleAri)) {
    query['ScalingRuleAri'] = request.scalingRuleAri;
  }
  if (!Util.isUnset(request.scalingRuleId)) {
    query['ScalingRuleId'] = request.scalingRuleId;
  }
  if (!Util.isUnset(request.scalingRuleName)) {
    query['ScalingRuleName'] = request.scalingRuleName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeScalingRules',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI DescribeScalingRules is deprecated, please use Ess::2022-02-22::DescribeScalingRules,Ess::2014-08-28::DescribeScalingRules instead.
 *
 * @param request DescribeScalingRulesRequest
 * @return DescribeScalingRulesResponse
 */
// Deprecated
async function describeScalingRules(request: DescribeScalingRulesRequest): DescribeScalingRulesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeScalingRulesWithOptions(request, runtime);
}

model DescribeScheduledTasksRequest {
  scheduledAction?: [ string ](name='ScheduledAction'),
  scheduledTaskId?: [ string ](name='ScheduledTaskId'),
  scheduledTaskName?: [ string ](name='ScheduledTaskName'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeScheduledTasksResponseBody = {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  scheduledTasks?: {
    scheduledTask?: [ 
    {
      description?: string(name='Description'),
      launchExpirationTime?: int32(name='LaunchExpirationTime'),
      launchTime?: string(name='LaunchTime'),
      recurrenceEndTime?: string(name='RecurrenceEndTime'),
      recurrenceType?: string(name='RecurrenceType'),
      recurrenceValue?: string(name='RecurrenceValue'),
      scheduledAction?: string(name='ScheduledAction'),
      scheduledTaskId?: string(name='ScheduledTaskId'),
      scheduledTaskName?: string(name='ScheduledTaskName'),
      taskEnabled?: boolean(name='TaskEnabled'),
    }
  ](name='ScheduledTask')
  }(name='ScheduledTasks'),
  totalCount?: int32(name='TotalCount'),
}

model DescribeScheduledTasksResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeScheduledTasksResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI DescribeScheduledTasks is deprecated, please use Ess::2022-02-22::DescribeScheduledTasks,Ess::2014-08-28::DescribeScheduledTasks instead.
 *
 * @param request DescribeScheduledTasksRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeScheduledTasksResponse
 */
// Deprecated
async function describeScheduledTasksWithOptions(request: DescribeScheduledTasksRequest, runtime: Util.RuntimeOptions): DescribeScheduledTasksResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scheduledAction)) {
    query['ScheduledAction'] = request.scheduledAction;
  }
  if (!Util.isUnset(request.scheduledTaskId)) {
    query['ScheduledTaskId'] = request.scheduledTaskId;
  }
  if (!Util.isUnset(request.scheduledTaskName)) {
    query['ScheduledTaskName'] = request.scheduledTaskName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeScheduledTasks',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI DescribeScheduledTasks is deprecated, please use Ess::2022-02-22::DescribeScheduledTasks,Ess::2014-08-28::DescribeScheduledTasks instead.
 *
 * @param request DescribeScheduledTasksRequest
 * @return DescribeScheduledTasksResponse
 */
// Deprecated
async function describeScheduledTasks(request: DescribeScheduledTasksRequest): DescribeScheduledTasksResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeScheduledTasksWithOptions(request, runtime);
}

model DetachInstancesRequest {
  instanceId?: [ string ](name='InstanceId'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingGroupId?: string(name='ScalingGroupId', description='This parameter is required.'),
}

model DetachInstancesResponseBody = {
  requestId?: string(name='RequestId'),
  scalingActivityId?: string(name='ScalingActivityId'),
}

model DetachInstancesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DetachInstancesResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI DetachInstances is deprecated, please use Ess::2022-02-22::DetachInstances,Ess::2014-08-28::DetachInstances instead.
 *
 * @param request DetachInstancesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DetachInstancesResponse
 */
// Deprecated
async function detachInstancesWithOptions(request: DetachInstancesRequest, runtime: Util.RuntimeOptions): DetachInstancesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scalingGroupId)) {
    query['ScalingGroupId'] = request.scalingGroupId;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DetachInstances',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI DetachInstances is deprecated, please use Ess::2022-02-22::DetachInstances,Ess::2014-08-28::DetachInstances instead.
 *
 * @param request DetachInstancesRequest
 * @return DetachInstancesResponse
 */
// Deprecated
async function detachInstances(request: DetachInstancesRequest): DetachInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  return detachInstancesWithOptions(request, runtime);
}

model DisableScalingGroupRequest {
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  scalingGroupId?: string(name='ScalingGroupId', description='This parameter is required.'),
}

model DisableScalingGroupResponseBody = {
  requestId?: string(name='RequestId'),
}

model DisableScalingGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DisableScalingGroupResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI DisableScalingGroup is deprecated, please use Ess::2022-02-22::DisableScalingGroup,Ess::2014-08-28::DisableScalingGroup instead.
 *
 * @param request DisableScalingGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DisableScalingGroupResponse
 */
// Deprecated
async function disableScalingGroupWithOptions(request: DisableScalingGroupRequest, runtime: Util.RuntimeOptions): DisableScalingGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.scalingGroupId)) {
    query['ScalingGroupId'] = request.scalingGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DisableScalingGroup',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI DisableScalingGroup is deprecated, please use Ess::2022-02-22::DisableScalingGroup,Ess::2014-08-28::DisableScalingGroup instead.
 *
 * @param request DisableScalingGroupRequest
 * @return DisableScalingGroupResponse
 */
// Deprecated
async function disableScalingGroup(request: DisableScalingGroupRequest): DisableScalingGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return disableScalingGroupWithOptions(request, runtime);
}

model EnableScalingGroupRequest {
  instanceId?: [ string ](name='InstanceId'),
  activeScalingConfigurationId?: string(name='ActiveScalingConfigurationId'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  scalingGroupId?: string(name='ScalingGroupId', description='This parameter is required.'),
}

model EnableScalingGroupResponseBody = {
  requestId?: string(name='RequestId'),
}

model EnableScalingGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: EnableScalingGroupResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI EnableScalingGroup is deprecated, please use Ess::2014-08-28::EnableScalingGroup,Ess::2022-02-22::EnableScalingGroup instead.
 *
 * @param request EnableScalingGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return EnableScalingGroupResponse
 */
// Deprecated
async function enableScalingGroupWithOptions(request: EnableScalingGroupRequest, runtime: Util.RuntimeOptions): EnableScalingGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.activeScalingConfigurationId)) {
    query['ActiveScalingConfigurationId'] = request.activeScalingConfigurationId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.scalingGroupId)) {
    query['ScalingGroupId'] = request.scalingGroupId;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'EnableScalingGroup',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI EnableScalingGroup is deprecated, please use Ess::2014-08-28::EnableScalingGroup,Ess::2022-02-22::EnableScalingGroup instead.
 *
 * @param request EnableScalingGroupRequest
 * @return EnableScalingGroupResponse
 */
// Deprecated
async function enableScalingGroup(request: EnableScalingGroupRequest): EnableScalingGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return enableScalingGroupWithOptions(request, runtime);
}

model ExecuteScalingRuleRequest {
  clientToken?: string(name='ClientToken'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingRuleAri?: string(name='ScalingRuleAri', description='This parameter is required.'),
}

model ExecuteScalingRuleResponseBody = {
  requestId?: string(name='RequestId'),
  scalingActivityId?: string(name='ScalingActivityId'),
}

model ExecuteScalingRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ExecuteScalingRuleResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI ExecuteScalingRule is deprecated, please use Ess::2014-08-28::ExecuteScalingRule,Ess::2022-02-22::ExecuteScalingRule instead.
 *
 * @param request ExecuteScalingRuleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ExecuteScalingRuleResponse
 */
// Deprecated
async function executeScalingRuleWithOptions(request: ExecuteScalingRuleRequest, runtime: Util.RuntimeOptions): ExecuteScalingRuleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scalingRuleAri)) {
    query['ScalingRuleAri'] = request.scalingRuleAri;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ExecuteScalingRule',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI ExecuteScalingRule is deprecated, please use Ess::2014-08-28::ExecuteScalingRule,Ess::2022-02-22::ExecuteScalingRule instead.
 *
 * @param request ExecuteScalingRuleRequest
 * @return ExecuteScalingRuleResponse
 */
// Deprecated
async function executeScalingRule(request: ExecuteScalingRuleRequest): ExecuteScalingRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return executeScalingRuleWithOptions(request, runtime);
}

model ModifyScalingGroupRequest {
  removalPolicy?: [ string ](name='RemovalPolicy'),
  activeScalingConfigurationId?: string(name='ActiveScalingConfigurationId'),
  defaultCooldown?: int32(name='DefaultCooldown'),
  maxSize?: int32(name='MaxSize'),
  minSize?: int32(name='MinSize'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  scalingGroupId?: string(name='ScalingGroupId', description='This parameter is required.'),
  scalingGroupName?: string(name='ScalingGroupName'),
}

model ModifyScalingGroupResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyScalingGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyScalingGroupResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI ModifyScalingGroup is deprecated, please use Ess::2014-08-28::ModifyScalingGroup,Ess::2022-02-22::ModifyScalingGroup instead.
 *
 * @param request ModifyScalingGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyScalingGroupResponse
 */
// Deprecated
async function modifyScalingGroupWithOptions(request: ModifyScalingGroupRequest, runtime: Util.RuntimeOptions): ModifyScalingGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.activeScalingConfigurationId)) {
    query['ActiveScalingConfigurationId'] = request.activeScalingConfigurationId;
  }
  if (!Util.isUnset(request.defaultCooldown)) {
    query['DefaultCooldown'] = request.defaultCooldown;
  }
  if (!Util.isUnset(request.maxSize)) {
    query['MaxSize'] = request.maxSize;
  }
  if (!Util.isUnset(request.minSize)) {
    query['MinSize'] = request.minSize;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.scalingGroupId)) {
    query['ScalingGroupId'] = request.scalingGroupId;
  }
  if (!Util.isUnset(request.scalingGroupName)) {
    query['ScalingGroupName'] = request.scalingGroupName;
  }
  if (!Util.isUnset(request.removalPolicy)) {
    query['RemovalPolicy'] = request.removalPolicy;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyScalingGroup',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI ModifyScalingGroup is deprecated, please use Ess::2014-08-28::ModifyScalingGroup,Ess::2022-02-22::ModifyScalingGroup instead.
 *
 * @param request ModifyScalingGroupRequest
 * @return ModifyScalingGroupResponse
 */
// Deprecated
async function modifyScalingGroup(request: ModifyScalingGroupRequest): ModifyScalingGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyScalingGroupWithOptions(request, runtime);
}

model ModifyScalingRuleRequest {
  adjustmentType?: string(name='AdjustmentType'),
  adjustmentValue?: int32(name='AdjustmentValue'),
  cooldown?: int32(name='Cooldown'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingRuleId?: string(name='ScalingRuleId', description='This parameter is required.'),
  scalingRuleName?: string(name='ScalingRuleName'),
}

model ModifyScalingRuleResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyScalingRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyScalingRuleResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI ModifyScalingRule is deprecated, please use Ess::2014-08-28::ModifyScalingRule,Ess::2022-02-22::ModifyScalingRule instead.
 *
 * @param request ModifyScalingRuleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyScalingRuleResponse
 */
// Deprecated
async function modifyScalingRuleWithOptions(request: ModifyScalingRuleRequest, runtime: Util.RuntimeOptions): ModifyScalingRuleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.adjustmentType)) {
    query['AdjustmentType'] = request.adjustmentType;
  }
  if (!Util.isUnset(request.adjustmentValue)) {
    query['AdjustmentValue'] = request.adjustmentValue;
  }
  if (!Util.isUnset(request.cooldown)) {
    query['Cooldown'] = request.cooldown;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scalingRuleId)) {
    query['ScalingRuleId'] = request.scalingRuleId;
  }
  if (!Util.isUnset(request.scalingRuleName)) {
    query['ScalingRuleName'] = request.scalingRuleName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyScalingRule',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI ModifyScalingRule is deprecated, please use Ess::2014-08-28::ModifyScalingRule,Ess::2022-02-22::ModifyScalingRule instead.
 *
 * @param request ModifyScalingRuleRequest
 * @return ModifyScalingRuleResponse
 */
// Deprecated
async function modifyScalingRule(request: ModifyScalingRuleRequest): ModifyScalingRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyScalingRuleWithOptions(request, runtime);
}

model ModifyScheduledTaskRequest {
  description?: string(name='Description'),
  launchExpirationTime?: int32(name='LaunchExpirationTime'),
  launchTime?: string(name='LaunchTime'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  recurrenceEndTime?: string(name='RecurrenceEndTime'),
  recurrenceType?: string(name='RecurrenceType'),
  recurrenceValue?: string(name='RecurrenceValue'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scheduledAction?: string(name='ScheduledAction'),
  scheduledTaskId?: string(name='ScheduledTaskId', description='This parameter is required.'),
  scheduledTaskName?: string(name='ScheduledTaskName'),
  taskEnabled?: boolean(name='TaskEnabled'),
}

model ModifyScheduledTaskResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyScheduledTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyScheduledTaskResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI ModifyScheduledTask is deprecated, please use Ess::2014-08-28::ModifyScheduledTask,Ess::2022-02-22::ModifyScheduledTask instead.
 *
 * @param request ModifyScheduledTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyScheduledTaskResponse
 */
// Deprecated
async function modifyScheduledTaskWithOptions(request: ModifyScheduledTaskRequest, runtime: Util.RuntimeOptions): ModifyScheduledTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.launchExpirationTime)) {
    query['LaunchExpirationTime'] = request.launchExpirationTime;
  }
  if (!Util.isUnset(request.launchTime)) {
    query['LaunchTime'] = request.launchTime;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.recurrenceEndTime)) {
    query['RecurrenceEndTime'] = request.recurrenceEndTime;
  }
  if (!Util.isUnset(request.recurrenceType)) {
    query['RecurrenceType'] = request.recurrenceType;
  }
  if (!Util.isUnset(request.recurrenceValue)) {
    query['RecurrenceValue'] = request.recurrenceValue;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scheduledAction)) {
    query['ScheduledAction'] = request.scheduledAction;
  }
  if (!Util.isUnset(request.scheduledTaskId)) {
    query['ScheduledTaskId'] = request.scheduledTaskId;
  }
  if (!Util.isUnset(request.scheduledTaskName)) {
    query['ScheduledTaskName'] = request.scheduledTaskName;
  }
  if (!Util.isUnset(request.taskEnabled)) {
    query['TaskEnabled'] = request.taskEnabled;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyScheduledTask',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI ModifyScheduledTask is deprecated, please use Ess::2014-08-28::ModifyScheduledTask,Ess::2022-02-22::ModifyScheduledTask instead.
 *
 * @param request ModifyScheduledTaskRequest
 * @return ModifyScheduledTaskResponse
 */
// Deprecated
async function modifyScheduledTask(request: ModifyScheduledTaskRequest): ModifyScheduledTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyScheduledTaskWithOptions(request, runtime);
}

model RemoveInstancesRequest {
  instanceId?: [ string ](name='InstanceId'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scalingGroupId?: string(name='ScalingGroupId', description='This parameter is required.'),
}

model RemoveInstancesResponseBody = {
  requestId?: string(name='RequestId'),
  scalingActivityId?: string(name='ScalingActivityId'),
}

model RemoveInstancesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveInstancesResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI RemoveInstances is deprecated, please use Ess::2014-08-28::RemoveInstances,Ess::2022-02-22::RemoveInstances instead.
 *
 * @param request RemoveInstancesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveInstancesResponse
 */
// Deprecated
async function removeInstancesWithOptions(request: RemoveInstancesRequest, runtime: Util.RuntimeOptions): RemoveInstancesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scalingGroupId)) {
    query['ScalingGroupId'] = request.scalingGroupId;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveInstances',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI RemoveInstances is deprecated, please use Ess::2014-08-28::RemoveInstances,Ess::2022-02-22::RemoveInstances instead.
 *
 * @param request RemoveInstancesRequest
 * @return RemoveInstancesResponse
 */
// Deprecated
async function removeInstances(request: RemoveInstancesRequest): RemoveInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeInstancesWithOptions(request, runtime);
}

model VerifyAuthenticationRequest {
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  uid?: long(name='Uid'),
}

model VerifyAuthenticationResponseBody = {
  requestId?: string(name='RequestId'),
}

model VerifyAuthenticationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: VerifyAuthenticationResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI VerifyAuthentication is deprecated, please use Ess::2014-08-28::VerifyAuthentication instead.
 *
 * @param request VerifyAuthenticationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return VerifyAuthenticationResponse
 */
// Deprecated
async function verifyAuthenticationWithOptions(request: VerifyAuthenticationRequest, runtime: Util.RuntimeOptions): VerifyAuthenticationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.uid)) {
    query['Uid'] = request.uid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'VerifyAuthentication',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI VerifyAuthentication is deprecated, please use Ess::2014-08-28::VerifyAuthentication instead.
 *
 * @param request VerifyAuthenticationRequest
 * @return VerifyAuthenticationResponse
 */
// Deprecated
async function verifyAuthentication(request: VerifyAuthenticationRequest): VerifyAuthenticationResponse {
  var runtime = new Util.RuntimeOptions{};
  return verifyAuthenticationWithOptions(request, runtime);
}

model VerifyUserRequest {
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
}

model VerifyUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
}

/**
 * @deprecated OpenAPI VerifyUser is deprecated, please use Ess::2014-08-28::VerifyUser instead.
 *
 * @param request VerifyUserRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return VerifyUserResponse
 */
// Deprecated
async function verifyUserWithOptions(request: VerifyUserRequest, runtime: Util.RuntimeOptions): VerifyUserResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'VerifyUser',
    version = '2016-07-22',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'none',
  };
  return callApi(params, req, runtime);
}

/**
 * @deprecated OpenAPI VerifyUser is deprecated, please use Ess::2014-08-28::VerifyUser instead.
 *
 * @param request VerifyUserRequest
 * @return VerifyUserResponse
 */
// Deprecated
async function verifyUser(request: VerifyUserRequest): VerifyUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return verifyUserWithOptions(request, runtime);
}

